home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d8 / t3fonfil.doc < prev    next >
Text File  |  1991-08-04  |  3KB  |  69 lines

  1. /*
  2.    TELIX communications program v3.0 dialing directory file format.
  3.    Copyright (c) 1988 PTel, Post Office Box 130, West Hill, Ont. M1E 4R4
  4.  
  5.    A Telix 3.0 dialing directory file is variable sized, and can hold from
  6.    1 to 1000 entries (1000 is an arbitrary limit which might be raised, so
  7.    do not get too dependent on it).  A dialing directory file consists of
  8.    one ddf_header structure followed by a dd_entry structure for each
  9.    entry iu the dialing directory.  All data is stored in Intel format. 
  10.    This means that when integers and longs are written to disk, they are
  11.    written in the order low byte to high byte.  Since all Intel chips
  12.    (like the 8088 and 80x86 used in PCs) store data in this fashion, this
  13.    is of concern only if you are trying to access a directory file from a
  14.    computer using another microprocessor, like the Mac's 68000.
  15.  
  16.    The 2 structures follow, in C format.
  17.    All structures are packed.  No padding should be used by the compiler
  18.    to align data on even addresses.  For example, if using the MS C
  19.    compiler, use the -Zp switch!
  20. */
  21.  
  22. struct ddf_header
  23. {
  24.  long id;                 /* should be hex 2e2b291a */
  25.  int  ddf_vers;           /* currently 1 */
  26.  int  num_entries;        /* # of entries in directory, from 1 to 1000 */
  27.  char pencrypted;         /* currently 0, will be used for encryption */
  28.  char spare[55];
  29. };
  30.  
  31. struct dd_entry
  32. {
  33.  char     name[25],       /* entry name */
  34.           number[17],     /* phone number */
  35.           baud,           /* baud rate, see below */
  36.           parity,         /* parity: 0 = none, 1 = even, 2 = odd */
  37.           data,           /* number of data bits, 7 or 8 */
  38.           stop,           /* number of stop bits, 1 or 2 */
  39.           script[12],     /* linked script file name */
  40.           lastcall[6];    /* last call date, stored in ASCII, w/o slashes */
  41.  unsigned totcalls;       /* total successful calls to this entry */
  42.  char     terminal,       /* terminal type to use, see below */
  43.           protocol,       /* default protocol; first letter */
  44.           toggles,        /* bit 0: local echo - 0 = off, 1 = on */
  45.                           /* bit 1: add LFs    - 0 = off, 1 = on */
  46.                           /* bit 2: BS trans   - 0 = destructive, 1 = not */
  47.                           /* bit 3: BS key     - 0 = sends BS, 1 = sends DEL */
  48.           filler1,
  49.           filler2,
  50.           dprefnum,       /* dialing prefix number to use when dialing */
  51.           password[14];   /* password for this entry */
  52. };
  53.  
  54. /*
  55.    ASCII string fields like the name, number, password, etc. are stored in
  56.    C format, but include the terminating 0 only if there is room. For example,
  57.    if an entry name is 25 characters long it will completely fill up the field,
  58.    and no terminating zero will be added. This was done for space reasons, but
  59.    means that if you manipulate the directories you must take care. C program-
  60.    mers for example should use the strncpy function instead of the strcpy func-
  61.    tion to access these fields, and must make sure to add a terminating zero.
  62.  
  63.    baud field:     0 =  300, 1 =  1200, 2 =  2400, 3 =  4800,
  64.                    4 = 9600, 5 = 19200, 6 = 38400, 7 = 57600, 8 = 115200
  65.  
  66.    terminal field: integer number from 0 - n equivalent to that entry
  67.                    in menu shown when Alt-T function invoked
  68. */
  69.